﻿#ifndef __WIFIUSER_H__
#define __WIFIUSER_H__
#include "WiFi.h"
#include <SPI.h>
#include <PubSubClient.h>

// MQTT Broker
extern const char *mqtt_broker;
extern const char *topic_publish;
extern const char *topic_subscribe;
extern const char *mqtt_username ;
extern const char *mqtt_password;
extern const int mqtt_port;
extern int is_transfer_mqtt;

// extern const char *mqtt_broker = "broker.emqx.io";
// extern const char *topic = "esp32/testzengk";
// extern const char *mqtt_username = "emqx";
// extern const char *mqtt_password = "public";
// extern const int mqtt_port = 1883;
//for our data output loop


void init_wifi();
void handleMqtt();
void sendMessage(char *message);
extern void mqtt_callback(char *topic, byte *payload, unsigned int length);
#endif